﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using VisionCloud.Core.Model.Ms;
using VisionCloud.Domain.Common;
using VisionCloud.Domain.DtoModel.Ms;

namespace VisionCloud.Domain.Repository.Interface.Ms
{
    public interface IMsHouseMapRepository : IBaseRepository<MsHouseMap>
    {
        /// <summary>
        /// 根据户型图Id判断户型图是否已使用
        /// </summary>
        /// <param name="houseMapId">户型图Id</param>
        /// <returns></returns>
        Task<bool> IsHouseMapUsed(Guid houseMapId);

        /// <summary>
        /// 获取项目户型图列表
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        ValueTask<List<ProjectHouseMap>> GetHouseMapAsync(MsHouseMapCondition condition);

        /// <summary>
        /// 获取项目户型图列表
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        Task<ApiPageResult> GetHouseMap(MsHouseMapCondition condition);

        /// <summary>
        /// 获取户型图信息
        /// </summary>
        /// <param name="houseMapId">户型图Id</param>
        /// <returns></returns>
        Task<MsHouseMapDto> GetHouseMap(Guid houseMapId);

        /// <summary>
        /// 获取户型图信息
        /// </summary>
        /// <param name="houseMapId">户型图Id</param>
        /// <returns></returns>
        ValueTask<string> GetHouseMapBase(Guid houseMapId);

        /// <summary>
        /// 获取户型图Url
        /// </summary>
        /// <param name="taskId"></param>
        /// <returns></returns>
        ValueTask<string> GetHouseMapBaseUrl(Guid taskId);

        /// <summary>
        /// 获取户型图base64
        /// </summary>
        /// <param name="houseMapId"></param>
        /// <returns></returns>
        Task<string> GetHouseMapBase64(Guid houseMapId);

        /// <summary>
        /// 根据站点类型获取户型图信息
        /// </summary>
        /// <param name="condition">查询条件</param>
        /// <returns></returns>
        Task<List<MsHouseMap>> GetHouseMapByPointType(HouseMapCondition condition);

        /// <summary>
        /// 查询户型图名称是否已存在
        /// </summary>
        /// <param name="condition">户型图名称</param>
        /// <returns></returns>
        Task<ApiPageResult> ExistedHouseMap(MsHouseMapCondition condition);

        /// <summary>
        /// 根据任务Id获取户型图信息
        /// </summary>
        /// <param name="projectId">查询条件</param>
        /// <returns></returns>
        Task<List<MsHouseMap>> GetHouseMapByProject(Guid projectId);

        Task<List<MsHouseMap>> GetDataByProjects(Guid[] projectIds);

        Task<bool> HouseMapForProjectIsPublice(Guid houseMapId);

        /// <summary>
        /// 获取户型图对应的站点类型
        /// </summary>
        /// <param name="projectId"></param>
        /// <param name="houseMapId"></param>
        /// <returns></returns>
        ValueTask<List<MeasurePoints>> GetPointTypes(Guid projectId, Guid houseMapId);
    }
}